package com.itheima.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.MenuDao;
import com.itheima.pojo.User;
import com.itheima.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

@Service(interfaceClass = MenuService.class)
@Transactional
public class MenuServiceImpl implements MenuService {
    //private static BCryptPasswordEncoder passwordEncoder=new BCryptPasswordEncoder();
    @Autowired
    private MenuDao menuDao;


    @Override
    public User findUserWithMenuByUsername(String username) {
        User user = menuDao.findUserWithMenuByUsername(username);
        if(user==null){
            return null;
        }
        return user;
    }

}
